import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import About from '../views/About'



Vue.use(VueRouter)

const routes = [
  //默认跳转页面
  //   path: '/',
  //   redirect: '/college'
  // },
  {
    path: '/college',
    name: 'College',
    component: () => import( /* webpackChunkName: "college" */ '../views/College.vue')

  },
  {
    path: '/myStudy',
    name: 'MyStudy',
    component: () => import( /* webpackChunkName: "college" */ '../views/MyStudy.vue')

  },
  {
    path: '/login',
    name: 'Login',
    component: () => import( /* webpackChunkName: "college" */ '../views/Login.vue')
  },
  {
    path: '/login2',
    name: 'Login2',
    component: () => import( /* webpackChunkName: "college" */ '../views/Login2.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import( /* webpackChunkName: "college" */ '../views/Register.vue')
  },
  {
    path: '/programme',
    name: 'Programme',
    component: () => import( /* webpackChunkName: "programme" */ '../views/Programme.vue')

  },
  {
    path: '/ielts',
    name: 'Ielts',
    component: () => import(/* webpackChunkName: "ielts" */ '../views/Ielts.vue')
  },
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: "/about",
    component: About,
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/course',
    name: 'Course',
    component: () => import(/* webpackChunkName: "course" */ '../views/Course.vue')
  },
  {
    path: '/programme',
    name: 'Programme',
    component: () => import(/* webpackChunkName: "programme" */ '../views/Programme.vue')
  },
  {
    path: '/college',
    name: 'College',
    component: () => import(/* webpackChunkName: "college" */ '../views/College.vue')
  },
  {
    path: '/ielts',
    name: 'Ielts',
    component: () => import(/* webpackChunkName: "ielts" */ '../views/Ielts.vue')
  },
  {
    path: '/python',
    name: 'Python',
    component: () => import(/* webpackChunkName: "python" */ '../views/Python.vue')
  },

]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router